<?php 
function space_url($userid)
{
	global $MODULE;
	return $MODULE['space']['url'].'?userid='.$userid;
}

function content_url($contentid)
{
	global $db;
	$contentid = intval($contentid);
	if($contentid < 1) return '';
	$r = $db->get_one("SELECT `url` FROM `".DB_PRE."content` WHERE `contentid`=$contentid");
	return $r ? $r['url'] : '';
}

function company_url($userid = 0, $sitedomain = '')
{
	global $SETTING;
	$M = cache_read('module_yp.php', '', 1);
	if(SECONDDOMAIN_ENABLE && preg_match('/([A-Za-z0-9-]+)/i',$sitedomain))
	{
		return 'http://'.$sitedomain.'.'.SECONDDOMAIN_NAME;
	}
	else
	{
		return $SETTING['siteurl'].'yp/web/?'.$userid;
	}
}
?>